<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home_model extends CI_Model 
{
	function __construct()
	{
		parent:: __construct();
	}

	function getMenu()
	{
	
	}

	function getArticle()
	{
		$sql = "SELECT news.news_id, logs.username, news.news_date, news.news_title, news.news_content
				FROM LKK_NEWS_MST news INNER JOIN logins logs ON logs.hr_id = news.hr_id";
		$result = $this->db->query($sql);
		$Udata = $result->result_array();
		$Rdata = $result->num_rows();
		if ($Rdata > 0)
		{
			return $Udata;
		}
		else
		{
			return FALSE;
		}
	}
	
	function gethris()
	{
		$sql = "SELECT *
				FROM logins";
		$result = $this->db->query($sql);
		$Udata = $result->result_array();
		$Rdata = $result->num_rows();
		if ($Rdata > 0)
		{
			return $Udata;
		}
		else
		{
			return FALSE;
		}
	}
}